<html>

<head>
<title>Forms MasterDetailsBlock Wizard</title>
<link href="../../../book.css" rel="stylesheet" type="text/css">
</head>

<body>

<table border="0" cellpadding="0" cellspacing="0" width="700">
  <tr>
    <td><h1>Forms MasterDetailsBlock Wizard</h1>
      <div align="left">
        <table border="0" cellpadding="0" cellspacing="0" width="100%">
          <tr>
            <td valign="top">
			<img src="images/wizard_forms_masterdetailsblock0.gif" align="left" hspace="10">Subclasses of the Eclipse Forms <b>MasterDetailsBlock</b> class can be
              created using the <b>Forms MasterDetailsBlock </b>wizard. The wizard can be
              selected from the drop down Designer wizard menu or from the
              Eclipse <b>New</b> wizard.
              <p>To use the wizard, select the project source folder and package
              to contain the class. Then enter the class name and hit the <b>Finish</b>
              button. 
              <p>For more information on using Eclipse Forms, see the <a href="http://dev.eclipse.org/viewcvs/index.cgi/~checkout~/pde-ui-home/working/EclipseForms/EclipseForms.html">Eclipse
              Forms Programming Guide</a>. </td>
          </tr>
        </table>
      </div>
      <p><img src="images/wizard_forms_masterdetailsblock1.gif">&nbsp;
      <img src="images/wizard_forms_masterdetailsblock2.gif"></p>
    <p>The wizard generates the following code.</p>
      <blockquote>
        <dl>
          <dt>
			<font SIZE="2" COLOR="#7f0055"><b>
			<font face="Courier">import</font></b></font><font face="Courier" SIZE="2"> </font>
			<font face="Courier New" size="2">org.eclipse.swt.SWT;<o:p>
                        </o:p>
                        </font></dt>
          <dt>
			<font SIZE="2" COLOR="#7f0055"><b>
			<font face="Courier">import</font></b></font><font face="Courier" SIZE="2"> </font>
			<font face="Courier New" size="2">org.eclipse.swt.widgets.Composite;<o:p>
                        </o:p>
                        </font></dt>
          <dt>
			<font SIZE="2" COLOR="#7f0055"><b>
			<font face="Courier">import</font></b></font><font face="Courier" SIZE="2"> </font>
			<font face="Courier New" size="2">org.eclipse.ui.forms.DetailsPart;<o:p>
                        </o:p>
                        </font></dt>
          <dt>
			<font SIZE="2" COLOR="#7f0055"><b>
			<font face="Courier">import</font></b></font><font face="Courier" SIZE="2"> </font>
			<font face="Courier New" size="2">org.eclipse.ui.forms.IManagedForm;<o:p>
                        </o:p>
                        </font></dt>
          <dt>
			<font SIZE="2" COLOR="#7f0055"><b>
			<font face="Courier">import</font></b></font><font face="Courier" SIZE="2"> </font>
			<font face="Courier New" size="2">org.eclipse.ui.forms.MasterDetailsBlock;<o:p>
                        </o:p>
                        </font></dt>
          <dt>
			<font SIZE="2" COLOR="#7f0055"><b>
			<font face="Courier">import</font></b></font><font face="Courier" SIZE="2"> </font>
			<font face="Courier New" size="2">org.eclipse.ui.forms.widgets.ExpandableComposite;<o:p>
                        </o:p>
                        </font></dt>
          <dt>
			<font SIZE="2" COLOR="#7f0055"><b>
			<font face="Courier">import</font></b></font><font face="Courier" SIZE="2"> </font>
			<font face="Courier New" size="2">org.eclipse.ui.forms.widgets.FormToolkit;<o:p>
                        </o:p>
                        </font></dt>
          <dt>
			<font SIZE="2" COLOR="#7f0055"><b>
			<font face="Courier">import</font></b></font><font face="Courier" SIZE="2"> </font>
			<font face="Courier New" size="2">org.eclipse.ui.forms.widgets.Section;<o:p>
                        </o:p>
                        </font></dt>
          <dt><font face="Courier New" size="2">&nbsp;<o:p>
                        </o:p>
                        </font></dt>
          <dt><font face="Courier" size="2" color="#7f0055"><b>public</b></font><font face="Courier New" size="2">
                        </font><font face="Courier" size="2" color="#7f0055"><b>class</b></font><font face="Courier New" size="2"> FormsMasterDetailsBlockTest
                        </font><font face="Courier" size="2" color="#7f0055"><b>extends</b></font><font face="Courier New" size="2"> MasterDetailsBlock{<o:p>
                        </o:p>
                        </font></dt>
          <dt><font face="Courier New" size="2">&nbsp;&nbsp;&nbsp;
                        </font><font face="Courier" size="2" color="#7f0055"><b>public</b></font><font face="Courier New" size="2"> FormsMasterDetailsBlockTest () {<o:p>
                        </o:p>
                        </font></dt>
          <dt><font face="Courier New" size="2">&nbsp;&nbsp;&nbsp; }<o:p>
                        </o:p>
                        </font></dt>
          <dt><font face="Courier New" size="2">&nbsp;&nbsp;&nbsp;
                        </font><font face="Courier" size="2" color="#7f0055"><b>protected</b></font><font face="Courier New" size="2">
                        </font><font face="Courier" size="2" color="#7f0055"><b>void</b></font><font face="Courier New" size="2"> createMasterPart(IManagedForm managedForm,&nbsp;Composite 
			parent) {
                        </font></dt>
          <dt><font face="Courier New" size="2">&nbsp;&nbsp;&nbsp;
                        &nbsp;&nbsp;&nbsp;&nbsp;FormToolkit toolkit =
                        managedForm.getToolkit();<o:p>
                        </o:p>
                        </font></dt>
          <dt><font face="Courier New" size="2">&nbsp;&nbsp;&nbsp;
                        &nbsp;&nbsp;&nbsp;&nbsp;final Section section =
                        toolkit.createSection(parent, <o:p>
                        </o:p>
                        </font></dt>
          <dt><font face="Courier New" size="2">&nbsp;&nbsp;&nbsp;
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ExpandableComposite.</font><font size="2" color="#0000c0" face="Courier"><i>EXPANDED</i></font><font face="Courier New" size="2">
                        | ExpandableComposite.</font><font size="2" color="#0000c0" face="Courier"><i>TITLE_BAR</i></font><font face="Courier New" size="2">);<o:p>
                        </o:p>
                        </font></dt>
          <dt><font face="Courier New" size="2">&nbsp;&nbsp;&nbsp;
                        &nbsp;&nbsp;&nbsp;&nbsp;section.setText(</font><font size="2" color="#2a00ff" face="Courier">&quot;Empty
                        Master Section&quot;</font><font face="Courier New" size="2">);<o:p>
                        </o:p>
                        </font></dt>
          <dt><font face="Courier New" size="2">&nbsp;&nbsp;&nbsp;
                        &nbsp;&nbsp;&nbsp;&nbsp;final Composite composite =&nbsp;
                        </font></dt>
          <dt><font face="Courier New" size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        toolkit.createComposite(section, SWT.</font><font size="2" color="#0000c0" face="Courier"><i>NONE</i></font><font face="Courier New" size="2">);<o:p>
                        </o:p>
                        </font></dt>
          <dt><font face="Courier New" size="2">&nbsp;&nbsp;&nbsp;
                        &nbsp;&nbsp;&nbsp;&nbsp;toolkit.paintBordersFor(composite);<o:p>
                        </o:p>
                        </font></dt>
          <dt><font face="Courier New" size="2">&nbsp;&nbsp;&nbsp;
                        &nbsp;&nbsp;&nbsp;&nbsp;section.setClient(composite);<o:p>
                        </o:p>
                        </font></dt>
          <dt><font face="Courier New" size="2">&nbsp;&nbsp;&nbsp; }<o:p>
                        </o:p>
                        </font></dt>
          <dt><font face="Courier New" size="2">&nbsp;&nbsp;&nbsp;
                        </font><font face="Courier" size="2" color="#7f0055"><b>protected</b></font><font face="Courier New" size="2">
                        </font><font face="Courier" size="2" color="#7f0055"><b>void</b></font><font face="Courier New" size="2"> registerPages(DetailsPart detailsPart) {<o:p>
                        </o:p>
                        </font></dt>
          <dt><font face="Courier New" size="2">&nbsp;&nbsp;&nbsp; }<o:p>
                        </o:p>
                        </font></dt>
          <dt><font face="Courier New" size="2">&nbsp;&nbsp;&nbsp;
                        </font><font face="Courier" size="2" color="#7f0055"><b>
			protected</b></font><font face="Courier New" size="2">
                        </font><font face="Courier" size="2" color="#7f0055"><b>void</b></font><font face="Courier New" size="2"> createToolBarActions(IManagedForm
                        managedForm) {<o:p>
                        </o:p>
                        </font></dt>
          <dt><font face="Courier New" size="2">&nbsp;&nbsp;&nbsp; }<o:p>
                        </o:p>
                        </font></dt>
          <dt><font face="Courier New" size="2">}</font></dt>
        </dl>
      </blockquote>
      <p>When editing Eclipse Forms MasterDetailsBlocks, a set of specialized
		<a href="../../palettes/swt_palette.html#EclipseForms">Eclipse Forms widgets</a> is available with their own unique widget palette.
                    These widgets provide the &quot;flat&quot; look that is a
                    signature element of the Eclipse Forms API. Standard
      widgets and layout managers can also be used although they won't use the
                    flat look.</p>
      <div align="left">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td valign="top"><p>
			<img src="images/wizard_forms_masterdetailsblock3.gif" width="840" height="478"></td>
          </tr>
        </table>
      </div>
    </td>
  </tr>
</table>
</body>
</html>
